import request from '@/utils/request'

// ---------------------------------------------------------------------------------------------------------------
// 获取全部单选题信息
export function reqGetSingleList() {
  return request({
    url: '/bank/getSingleList',
    method: 'get'
  })
}
// 获取搜素单选题信息
export function reqSearchSingleList(single_content, lang_id, compose_flag) {
  return request({
    url: '/bank/searchSingleList',
    method: 'get',
    params: { single_content, lang_id, compose_flag }
  })
}
// 删除单选题
export function reqDeleteSingle(singleId) {
  return request({
    url: '/bank/deleteSingle?single_id=' + singleId,
    method: 'post'
  })
}
// 添加单选题题目
export function reqInsertSingleInfo(data) {
  return request({
    url: '/bank/insertSingleInfo',
    method: 'post',
    data
  })
}
// 更新单选题题目
export function reqUpdateSingleInfo(data) {
  return request({
    url: '/bank/updateSingleInfo',
    method: 'post',
    data
  })
}
// 添加导入单选题Excel文件
export function reqInsertSingleList(data) {
  return request({
    url: '/bank/insertSingleList',
    method: 'post',
    data
  })
}
// ---------------------------------------------------------------------------------------------------------------
// 获取全部多选题信息
export function reqGetMultipleList() {
  return request({
    url: '/bank/getMultipleList',
    method: 'get'
  })
}
// 获取搜素多选题信息
export function reqSearchMultipleList(multiple_content, lang_id, compose_flag) {
  return request({
    url: '/bank/searchMultipleList',
    method: 'get',
    params: { multiple_content, lang_id, compose_flag }
  })
}
// 删除多选题
export function reqDeleteMultiple(multipleId) {
  return request({
    url: '/bank/deleteMultiple?multiple_id=' + multipleId,
    method: 'post'
  })
}
// 添加多选题题目
export function reqInsertMultipleInfo(data) {
  return request({
    url: '/bank/insertMultipleInfo',
    method: 'post',
    data
  })
}
// 更新多选题题目
export function reqUpdateMultipleInfo(data) {
  return request({
    url: '/bank/updateMultipleInfo',
    method: 'post',
    data
  })
}
// 添加导入多选题Excel文件
export function reqInsertMultipleList(data) {
  return request({
    url: '/bank/insertMultipleList',
    method: 'post',
    data
  })
}
// ---------------------------------------------------------------------------------------------------------------
// 获取全部判断题信息
export function reqGetJudgeList() {
  return request({
    url: '/bank/getJudgeList',
    method: 'get'
  })
}
// 获取搜素判断题信息
export function reqSearchJudgeList(judge_content, lang_id, compose_flag) {
  return request({
    url: '/bank/searchJudgeList',
    method: 'get',
    params: { judge_content, lang_id, compose_flag }
  })
}
// 删除判断题
export function reqDeleteJudge(judgeId) {
  return request({
    url: '/bank/deleteJudge?judge_id=' + judgeId,
    method: 'post'
  })
}
// 添加判断题题目
export function reqInsertJudgeInfo(data) {
  return request({
    url: '/bank/insertJudgeInfo',
    method: 'post',
    data
  })
}
// 更新判断题题目
export function reqUpdateJudgeInfo(data) {
  return request({
    url: '/bank/updateJudgeInfo',
    method: 'post',
    data
  })
}
// 添加导入判断题Excel文件
export function reqInsertJudgeList(data) {
  return request({
    url: '/bank/insertJudgeList',
    method: 'post',
    data
  })
}
// ---------------------------------------------------------------------------------------------------------------
// 获取全部填空题信息
export function reqGetFillList() {
  return request({
    url: '/bank/getFillList',
    method: 'get'
  })
}
// 获取搜素填空题信息
export function reqSearchFillList(fill_content, lang_id, compose_flag) {
  return request({
    url: '/bank/searchFillList',
    method: 'get',
    params: { fill_content, lang_id, compose_flag }
  })
}
// 删除填空题
export function reqDeleteFill(FillId) {
  return request({
    url: '/bank/deleteFill?fill_id=' + FillId,
    method: 'post'
  })
}
// 添加填空题题目
export function reqInsertFillInfo(data) {
  return request({
    url: '/bank/insertFillInfo',
    method: 'post',
    data
  })
}
// 更新填空题题目
export function reqUpdateFillInfo(data) {
  return request({
    url: '/bank/updateFillInfo',
    method: 'post',
    data
  })
}
// 添加导入填空题Excel文件
export function reqInsertFillList(data) {
  return request({
    url: '/bank/insertFillList',
    method: 'post',
    data
  })
}


// ---------------------------------------
// 获取题目分类信息
export function reqGetSubjectList(top) {
  return request({
    url: '/bank/getSubjectList?top=' + top,
    method: 'get'
  })
}
// 删除题目分类
export function reqDeleteSubject(subjectId, defaultId) {
  return request({
    url: '/bank/deleteSubject?subjectId=' + subjectId + '&defaultId=' + defaultId,
    method: 'post'
  })
}
// 添加题目分类
export function reqInsertSubjectInfo(data) {
  return request({
    url: '/bank/insertSubjectInfo',
    method: 'post',
    data
  })
}
// 更新题目分类
export function reqUpdateSubjectInfo(data) {
  return request({
    url: '/bank/updateSubjectInfo',
    method: 'post',
    data
  })
}
// 获取题目列表合集
export function reqSearchQuesList(Qtype, Qcontent, langid) {
  return request({
    url: '/bank/searchQuesList',
    method: 'get',
    params: { Qtype, Qcontent, langid }
  })
}
// 题目分类-获取当前选中节点及旗下的所有id
export function reqGetSubjects(RootId) {
  return request({
    url: '/bank/getSubjects',
    method: 'get',
    params: { RootId }
  })
}
// 添加题目
export function reqInsertQuestion(data) {
  return request({
    url: '/bank/insertQuestion',
    method: 'post',
    data
  })
}
// 更新题目
export function reqUpdateQuestion(data) {
  return request({
    url: '/bank/updateQuestion',
    method: 'post',
    data
  })
}
// 删除题目
export function reqDeleteQuestion(data) {
  return request({
    url: '/bank/deleteQuestion',
    method: 'post',
    data
  })
}
